import { Controller, Get, Param } from "@nestjs/common";
import { Product2Service } from "src/core/service/product2.service";

@Controller('product')
export class Product2Controller{
constructor(private product:Product2Service){}
@Get()
async searchProducts(){
    return this.product.searchProducts();
}
@Get(':id')
async getProduct(@Param('id') id:string){
    return this.product.getProduct(id);
}
}